wayland: Pass shadow width to the compositor
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 11 Nov 2014 11:07:24 +0000 (12:07 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Sun, 23 Nov 2014 12:11:08 +0000 (13:11 +0100)
commit44c412ecc7f9b4051a4f883d5a62fda8139f47a8
treef61042491e37d8da84af8157cec60de33a6e5f88
parent6b95810aaefa73308f2effe43bb53cddac6f117b
wayland: Pass shadow width to the compositor

Use xdg_surface_set_window_geometry() to tell the compositor about the
shadow widths, this makes some gnome-shell/mutter features (edge resistance,
frames around windows in the overview, side maximization, ...) work alright
with GTK+.

In order to add this, some other places in gdkwindow-wayland had to gain
some knowledge about margins:

- xdg_surface_configure() now syncs the shadow after applying the state,
  and gdk_wayland_window_set_shadow_width() possibly reconfigures the
  window in order to preserve window geometry. This is necessary to keep
  shadows in sync with state/geometry changes, as this does not happen
  all at once.
- xdg_popups relative to an xdg_surface are shown relative to buffer
  coordinates, so the left/top margins must be added there.

https://bugzilla.gnome.org/show_bug.cgi?id=736742
gdk/wayland/gdkwindow-wayland.c